<?xml version="1.0" encoding="UTF-8" standalone="no"?><HBRRepo><variables/><rulesets/><rules/><components><component id="2" name="Forecast_Only_Trends" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Forecast_Only_Trends</property><property name="seeded">true</property><script type="calcscript"><![CDATA[elseif("OFS_Trend"->"BegBalance"==10)
				if(@isuda("Account","calcRound"))
                	IF(@ISMBR(&OEP_CurYr))
						"OFS_Calculated" = @Round(@prior("Actual"->"OFS_Total Plan"->"YearTotal",1,@LEVMBRS ("Years", 0))/12*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
                    ELSE
                    	"OFS_Calculated" = @Round(@prior("OFS_Total Plan"->"YearTotal",1,@LEVMBRS ("Years", 0))/12*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
                    ENDIF    
				else
                	IF(@ISMBR(&OEP_CurYr))
						"OFS_Calculated" = @prior("Actual"->"OFS_Total Plan"->"YearTotal",1,@LEVMBRS ("Years", 0))/12*(1+"OFS_% Increase/(Decrease)"->"BegBalance");
                    ELSE
                    	"OFS_Calculated" = @prior("OFS_Total Plan"->"YearTotal",1,@LEVMBRS ("Years", 0))/12*(1+"OFS_% Increase/(Decrease)"->"BegBalance");
                    ENDIF    
				endif
elseif("OFS_Trend"->"BegBalance"==3)
			if(@sumrange("OEP_Plan"->"OFS_Total Plan",&OEP_StartMnth:&OEP_EndMnth)-@sumrange("OEP_Actual"->"OFS_Load",&OEP_StartMnth:&OEP_CurMnth)>0)
				if(@ISACCTYPE(LAST))
					if(@isuda("Account","Calcround"))
						"OFS_Calculated"=@round("OEP_Plan"->"OFS_Total Plan");
					else
						"OFS_Calculated" ="OEP_Plan"->"OFS_Total Plan";
					endif
				else
					if(@isuda("Account","Calcround"))
						"OFS_Calculated"=@round(((@sumrange("OEP_Plan"->"OFS_Total Plan",&OEP_StartMnth:&OEP_EndMnth))-(@sumrange("OEP_Actual"->"OFS_Load",&OEP_StartMnth:&OEP_CurMnth)))/@count(skipnone,&OEP_FcstMnth:&OEP_EndMnth));
					else
						"OFS_Calculated"=((@sumrange("OEP_Plan"->"OFS_Total Plan",&OEP_StartMnth:&OEP_EndMnth))-(@sumrange("OEP_Actual"->"OFS_Load",&OEP_StartMnth:&OEP_CurMnth)))/@count(skipnone,&OEP_FcstMnth:&OEP_EndMnth);
					endif
				endif
			else
				"OFS_Calculated"=#missing;
			endif
    @calcmode(cell);
		elseif("OFS_Trend"->"BegBalance"==35)			
			if(@ismbr(&OEP_FCSTStartYr))
				if(@ismbr(&OEP_FcstMnth))
					if(@ismbr(@MBRCOMPARE("==", &OEP_FcstMnth, &OEP_StartMnth)))
						if(@isuda("Account","calcRound"))
							OFS_Calculated=@round((@prior("OFS_Load"->OEP_Actual->&OEP_EndMnth,1,@levmbrs(Years,0))*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
							(@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 2,@levmbrs(Years,0) )+@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 3,@levmbrs(Years,0) )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
						else
							OFS_Calculated=((@prior("OFS_Load"->OEP_Actual->&OEP_EndMnth,1,@levmbrs(Years,0))*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
  							(@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 2,@levmbrs(Years,0) )+@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 3,@levmbrs(Years,0) )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
						endif
					else
						if(@isuda("Account","calcRound"))
							OFS_Calculated=@round((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
							(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
						else
							OFS_Calculated=((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
							(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
						endif
					endif
				else
					if(@isuda("Account","calcRound"))
						OFS_Calculated=@round((@prior("OFS_Calculated")*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
                        (@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					else
						OFS_Calculated=((@prior("OFS_Calculated")*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
                        (@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					endif
				endif
			elseif(@ismbr(@RSIBLINGS(&OEP_FCSTStartYr)))
				if(@ismbr(&OEP_StartMnth))
					if(@isuda("Account","calcRound"))
						OFS_Calculated=@round((@prior("OFS_Calculated"->&OEP_EndMnth,1,@levmbrs(Years,0))*(@prior("OFS_Calculated",1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
						(@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 2,@levmbrs(Years,0) )+@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 3,@levmbrs(Years,0))))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					else
						OFS_Calculated=((@prior("OFS_Calculated"->&OEP_EndMnth,1,@levmbrs(Years,0))*(@prior("OFS_Calculated",1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
                        (@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 2,@levmbrs(Years,0) )+@prior( "OFS_Load"->OEP_Actual->&OEP_EndMnth, 3,@levmbrs(Years,0))))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					endif
				else
					if(@isuda("Account","calcRound"))
						OFS_Calculated=@round((@prior("OFS_Calculated")*(@prior("OFS_Calculated",1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
						(@MDSHIFT( "OFS_Calculated", -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					else
						OFS_Calculated=((@prior("OFS_Calculated")*(@prior("OFS_Calculated",1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
                        (@MDSHIFT( "OFS_Calculated", -1, "Period",@relative(YearTotal,0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative(YearTotal,0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
					endif
				endif
			endif
	@calcmode(block);
		elseif("OFS_Trend"->"BegBalance"==36)			
			if(@isuda("Account","calcRound"))					
		if(@ismbr(&OEP_FcstMnth) and @ismbr(&OEP_FcstStartYr))	
			"OFS_Calculated"=@round((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));			
		elseif(@ismbr(&OEP_StartMnth) and @ismbr(@RSIBLINGS(&OEP_FCSTStartYr)))
       		"OFS_Calculated"=@round((@Prior("OFS_Total Plan"->&OEP_EndMnth,1,@LEVMBRS ("Years", 0)))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
				else			
			"OFS_Calculated" =@round((@prior("OFS_Calculated")+@prior("OFS_Adjustment (+/-)"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));			
				endif	
			else		
		if(@ismbr(&OEP_FcstMnth) and @ismbr(&OEP_FcstStartYr))	
			"OFS_Calculated"=@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");			
		elseif(@ismbr(&OEP_StartMnth) and @ismbr(@RSIBLINGS(&OEP_FCSTStartYr)))
        	"OFS_Calculated"=@Prior("OFS_Total Plan"->&OEP_EndMnth,1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");
				else
			"OFS_Calculated" =(@prior("OFS_Calculated")+@prior("OFS_Adjustment (+/-)"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");			
				endif	
			endif]]></script></component><component id="1" name="Monthly_Trends" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Monthly_Trends</property><property name="seeded">true</property><script type="calcscript"><![CDATA[If("OFS_Trend"->"BegBalance"==1)						
	if(@isuda("Account","CalcRound"))					
		OFS_Calculated = @Round(@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth)*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		OFS_Calculated =@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->"BegBalance"==2)						
	if(@isuda("Account","CalcRound"))					
		OFS_Calculated =@Round(("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		OFS_Calculated = ("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
						
elseif("OFS_Trend"->"BegBalance"==4)						
	if(@isuda("Account","CalcRound"))					
		OFS_Calculated = @Round(@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		OFS_Calculated = @avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->"BegBalance"==5)						
	if(@isuda("Account","CalcRound"))					
		OFS_Calculated = @Round(("OEP_Actual"->"OFS_Load"->&OEP_PriorYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		OFS_Calculated = ("OEP_Actual"->"OFS_Load"->&OEP_PriorYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->BegBalance==12)						
	OFS_Calculated =#missing;					
elseif("OFS_Trend"->BegBalance==#missing and "OFS_Adjustment (+/-)"<>#missing)										
	OFS_Calculated=0;
    OFS_Calculated=#missing;					
					
]]></script></component><component id="5" name="Qrtly_Trends" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Qrtly_Trends</property><property name="seeded">true</property><script type="calcscript"><![CDATA[If("OFS_Trend"->"BegBalance"==1)										
		if(@isuda("Account","CalcRound"))	
        	if(@isuda("Account","Flow"))
				"OFS_Calculated" = @Round((@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth))*"PeriodsInQtr"*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
            else
            	"OFS_Calculated" = @Round((@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
            endif
		else
        	if(@isuda("Account","Flow"))
				OFS_Calculated =(@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth))*"PeriodsInQtr"*(1+"OFS_% Increase/(Decrease)"->"BegBalance");			
            else
            	OFS_Calculated =(@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , &OEP_StartMnth:&OEP_CurMnth))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");		
            endif
		endif									
elseif("OFS_Trend"->"BegBalance"==2)										
		if(@isuda("Account","CalcRound"))
        	if(@isuda("Account","Flow"))
				OFS_Calculated =@Round((("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")*"PeriodsInQtr")*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));	
            else
            	OFS_Calculated =@Round((("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));	
            endif
		else	
        	if(@isuda("Account","Flow"))
				OFS_Calculated = (("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load")*"PeriodsInQtr")*(1+"OFS_% Increase/(Decrease)"->"BegBalance");	
            else
            	OFS_Calculated = (("OEP_Actual"->&OEP_CurMnth->&OEP_CurYr->"OFS_Load"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");	
            endif
		endif									
	elseif("OFS_Trend"->"BegBalance"==4)										
		if(@isuda("Account","CalcRound"))		
        	if(@isuda("Account","Flow"))
				OFS_Calculated = @Round((@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0))*"PeriodsInQtr")*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));		
            else
           		OFS_Calculated = @Round((@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0)))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));	
            endif
		else	
        	if(@isuda("Account","Flow"))
				OFS_Calculated = (@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0))*"PeriodsInQtr")*(1+"OFS_% Increase/(Decrease)"->"BegBalance");	
            else
            	OFS_Calculated = (@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("YearTotal",0)))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");
            endif
		endif												
	elseif("OFS_Trend"->"BegBalance"==10)										
		if(@prior("OEP_Qrtly Plan",1,@levmbrs("Years",0))<>#Missing)									
			if(@isuda("Account","CalcRound"))								
				@Round(@Prior("OFS_Total Plan",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));							
			else								
				@Prior("OFS_Total Plan",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");							
			endif								
		else									
			if(@isuda("Account","CalcRound"))								
				if(@ismbr("Qtrly 1"))							
					@Round(@Prior("OFS_Total Plan"->"Q1",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));						
				elseif(@ismbr("Qtrly 2"))							
					@Round(@Prior("OFS_Total Plan"->"Q2",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));						
				elseif(@ismbr("Qtrly 3"))							
					@Round(@Prior("OFS_Total Plan"->"Q3",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));						
				elseif(@ismbr("Qtrly 4"))							
					@Round(@Prior("OFS_Total Plan"->"Q4",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));						
				endif							
			else								
				if(@ismbr("Qtrly 1"))							
					@Prior("OFS_Total Plan"->"Q1",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");						
				elseif(@ismbr("Qtrly 2"))							
					@Prior("OFS_Total Plan"->"Q2",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");						
				elseif(@ismbr("Qtrly 3"))							
					@Prior("OFS_Total Plan"->"Q3",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");						
				elseif(@ismbr("Qtrly 4"))							
					@Prior("OFS_Total Plan"->"Q4",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");						
				endif							
			endif								
											
		endif									
	elseif("OFS_Trend"->BegBalance==12)										
				OFS_Calculated=#missing;							
	elseif("OFS_Trend"->BegBalance==#missing and "OFS_Adjustment (+/-)"<>#missing)																
				OFS_Calculated=0;
                OFS_Calculated=#missing;							
	endif										

]]></script></component><component id="4" name="Weekly_ForecastOnly" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Weekly_ForecastOnly</property><property name="seeded">true</property><script type="calcscript"><![CDATA[elseif("OFS_Trend"->"BegBalance"==3)						
	if(("OEP_Plan"->"OFS_Total Plan"->"OEP_Weekly Plan")-@sumrange("OEP_Actual"->"OFS_Load",OEP_W1:&OEP_CurWeek)>0)							
          if(@ISACCTYPE(LAST))				
              if(@isuda("Account","Calcround"))			
                  "OFS_Calculated"=@round("OEP_Plan"->"OFS_Total Plan");		
              else			
                  "OFS_Calculated" ="OEP_Plan"->"OFS_Total Plan";		
              endif			
          else				
              	if(@isuda("Account","Calcround"))		
				"OFS_Calculated"=@round((("OEP_Plan"->"OFS_Total Plan"->"OEP_Weekly Plan")-@sumrange("OEP_Actual"->"OFS_Load",OEP_W1:&OEP_CurWeek))/("TP-Weeks"-@count(skipnone,@range("OFS_Load",OEP_W1:&OEP_CurWeek))));				
                  else
				"OFS_Calculated"=((("OEP_Plan"->"OFS_Total Plan"->"OEP_Weekly Plan")-@sumrange("OEP_Actual"->"OFS_Load",OEP_W1:&OEP_CurWeek))/("TP-Weeks"-@count(skipnone,@range("OFS_Direct Input",OEP_W1:&OEP_CurWeek))));				
              endif			
          endif				
      else					
          "OFS_Calculated"=#missing;				
      endif	
elseif("OFS_Trend"->"BegBalance"==35)			
  	if(@isuda("Account","calcRound"))		  			
  		if(@ismbr(&OEP_FcstMnth))	
			"OFS_Calculated"=@round((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
			(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));					
  		else
			"OFS_Calculated" =@round((@prior("OFS_Calculated")*					
  			(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
			(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));					
  		endif	
  	else		
  		if(@ismbr(&OEP_FcstMnth))	
			"OFS_Calculated"=((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/					
			(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));					
  	 	else	 			
			"OFS_Calculated" =((@prior("OFS_Calculated")*					
  			(@prior("OFS_Load"->OEP_Actual,1,@LEVMBRS ("Years", 0))+@prior("OFS_Load"->OEP_Actual,2,@LEVMBRS ("Years", 0)))/
			(@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -1, "Years", )+@MDSHIFT( "OFS_Load"->OEP_Actual, -1, "Period",@relative("OEP_Weekly Plan",0) , -2, "Years", )))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));  					
  		endif	
  	endif	
elseif("OFS_Trend"->"BegBalance"==36)			
	if(@isuda("Account","calcRound"))					
		if(Not(@ismbr(OEP_W1:&OEP_CurWeek) and @ismbr(&OEP_CurYr)))	
			"OFS_Calculated"=@round((@prior("OFS_Load"->OEP_Actual->&OEP_CurYr))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));			
		elseif(@ismbr(OEP_W1) and @ismbr(@RSIBLINGS(&OEP_CurYr)))
       		"OFS_Calculated"=@round((@Prior("OFS_Total Plan"->OEP_W52,1,@LEVMBRS ("Years", 0)))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));
        else			
			"OFS_Calculated" =@round((@prior("OFS_Calculated")+@prior("OFS_Adjustment (+/-)"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));			
		endif	
	else		
		if(Not(@ismbr(OEP_W1:&OEP_CurWeek) and @ismbr(&OEP_CurYr)))	
			"OFS_Calculated"=@prior("OFS_Load"->OEP_Actual->&OEP_CurYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");			
		elseif(@ismbr(OEP_W1) and @ismbr(@RSIBLINGS(&OEP_CurYr)))
        	"OFS_Calculated"=@Prior("OFS_Total Plan"->OEP_W52,1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");
        else
			"OFS_Calculated" =(@prior("OFS_Calculated")+@prior("OFS_Adjustment (+/-)"))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");			
		endif	
	endif           ]]></script></component><component id="3" name="Weekly_Trends" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Weekly_Trends</property><property name="seeded">true</property><script type="calcscript"><![CDATA[If("OFS_Trend"->"BegBalance"==1)						
	if(@isuda("Account","CalcRound"))					
		"OFS_Calculated"=@Round(@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , OEP_W1:&OEP_CurWeek)*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		"OFS_Calculated"=@AVGRANGE(SKIPNONE , "OEP_Actual"->"OFS_Load"->&OEP_CurYr , OEP_W1:&OEP_CurWeek)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->"BegBalance"==2)						
	if(@isuda("Account","CalcRound"))					
		"OFS_Calculated"=@Round(("OEP_Actual"->&OEP_CurWeek->&OEP_CurYr->"OFS_Load")*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		"OFS_Calculated"=("OEP_Actual"->&OEP_CurWeek->&OEP_CurYr->"OFS_Load")*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->"BegBalance"==4)
	if("TP-Weeks"->&OEP_PriorYr==52)        
		if(@isuda("Account","CalcRound"))	 		  
			"OFS_Calculated"= @Round(@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,OEP_W1:OEP_W52)*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
		else					
			"OFS_Calculated"= @avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,OEP_W1:OEP_W52)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
		endif
	else       
		if(@isuda("Account","CalcRound"))	 		  
			"OFS_Calculated"= @Round(@avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("OEP_Weekly Plan",0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
		else					
			"OFS_Calculated"= @avgrange(skipnone,"OEP_Actual"->"OFS_Load"->&OEP_PriorYr,@relative("OEP_Weekly Plan",0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
		endif
	endif
elseif("OFS_Trend"->"BegBalance"==5)						
	if(@isuda("Account","CalcRound"))					
		"OFS_Calculated"= @Round(("OEP_Actual"->"OFS_Load"->&OEP_PriorYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
	else					
		"OFS_Calculated"= ("OEP_Actual"->"OFS_Load"->&OEP_PriorYr)*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
	endif					
elseif("OFS_Trend"->BegBalance==12)						
	"OFS_Calculated"=#missing;					
elseif("OFS_Trend"->BegBalance==#missing and "OFS_Adjustment (+/-)"<>#missing)										
	OFS_Calculated=0;
    OFS_Calculated=#missing;					]]></script></component><component id="6" name="Yearly_Trends" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Yearly_Trends</property><property name="seeded">true</property><script type="calcscript"><![CDATA[if("OFS_Trend"->"BegBalance"==10)							
	if(@prior("OEP_Yearly Plan"->"OFS_Total Plan",1,@levmbrs("Years",0))<>#Missing)						
		if(@isuda("Account","CalcRound"))					
			OFS_Calculated=@Round(@Prior("OFS_Total Plan",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
		else					
			OFS_Calculated=@Prior("OFS_Total Plan",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
		endif					
	elseif(@prior("OEP_Qrtly Plan"->"OFS_Total Plan",1,@levmbrs("Years",0))<>#Missing)						
		if(@isuda("Account","CalcRound"))					
			OFS_Calculated=@Round(@Prior("OFS_Total Plan"->"Qrtly Plan",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
		else					
			OFS_Calculated=@Prior("OFS_Total Plan"->"Qrtly Plan",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
		endif					
	elseif(@prior("YearTotal"->"OFS_Total Plan",1,@levmbrs("Years",0))<>#Missing)						
		if(@isuda("Account","CalcRound"))					
			OFS_Calculated=@Round(@Prior("OFS_Total Plan"->"YearTotal",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance"));				
		else					
			OFS_Calculated=@Prior("OFS_Total Plan"->"YearTotal",1,@LEVMBRS ("Years", 0))*(1+"OFS_% Increase/(Decrease)"->"BegBalance");				
		endif					
	endif						
							
elseif("OFS_Trend"->BegBalance==12)							
			OFS_Calculated=#missing;				
elseif("OFS_Trend"->BegBalance==#missing and "OFS_Adjustment (+/-)"<>#missing)	
			OFS_Calculated=0;
			OFS_Calculated=#missing;				
endif							


]]></script></component></components><templates><template custom="yes" id="1" name="OFS_PrepareForecast_T" product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">OFS_PrepareForecast_T</property><property name="seeded">true</property><statement kind="formula" name="" seq="1" type="component"><component id="-100" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Rev Source Flex1 = @PLANDI...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>Rev Source Flex1</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "Product")</user_inp></expression></formula><formula><destination><user_inp>Rev Source Flex2</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "RevenueSource2")</user_inp></expression></formula><formula><destination><user_inp>Rev Driver Flex1</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "Market")</user_inp></expression></formula><formula><destination><user_inp>Rev Driver Flex2</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "RevenueDriver2")</user_inp></expression></formula><formula><destination><user_inp>Rev Driver Flex3</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "RevenueDriver3")</user_inp></expression></formula><formula><destination><user_inp>Rev Driver Flex4</user_inp></destination><expression><user_inp>@PLANDIM(OEP_FS, "RevenueDriver4")</user_inp></expression></formula></conditionblock></formulae></component></statement><statement seq="2" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Currency eq Is Not Empty</property><property name="display_width">3</property><property name="Tile_Key">x2y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Application</user_inp></expression><expression seq="2"><user_inp>Is Simple Currency</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-102" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">strCurrencyFix = ,@relativ...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>strCurrencyFix</user_inp></destination><expression><user_inp>,@relative({Currency},0)</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="3" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Source Flex1 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x5y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Source Flex1</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-104" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevSrc1_Fix = Fix(@relativ...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevSrc1_Fix</user_inp></destination><expression><user_inp>Fix(@relative("Product",0))</user_inp></expression></formula><formula><destination><user_inp>RevSrc1_EndFix</user_inp></destination><expression><user_inp>[strEndFix]</user_inp></expression></formula><formula><destination><user_inp>RevSrc1_Agg</user_inp></destination><expression><user_inp>Agg("Product");</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="4" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Source Flex2 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x8y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Source Flex2</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-106" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevSrc2_Fix = Fix(@relativ...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevSrc2_Fix</user_inp></destination><expression><user_inp>Fix(@relative("RevenueSource2",0))</user_inp></expression></formula><formula><destination><user_inp>RevSrc2_EndFix</user_inp></destination><expression><user_inp>[strEndFix]</user_inp></expression></formula><formula><destination><user_inp>RevSrc2_Agg</user_inp></destination><expression><user_inp>Agg("RevenueSource2");</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="5" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Driver Flex1 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x11y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Driver Flex1</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-108" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevDriver1_Fix = Fix(@rela...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevDriver1_Fix</user_inp></destination><expression><user_inp>Fix(@relative("Market",0))</user_inp></expression></formula><formula><destination><user_inp>RevDriver1_EndFix</user_inp></destination><expression><user_inp>[strEndFix]</user_inp></expression></formula><formula><destination><user_inp>RevDriver1_Agg</user_inp></destination><expression><user_inp>Agg("Market");</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="6" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Driver Flex2 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x14y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Driver Flex2</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-110" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevDriver2_Fix = Fix(@rela...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevDriver2_Fix</user_inp></destination><expression><user_inp>Fix(@relative("RevenueDriver2",0))</user_inp></expression></formula><formula><destination><user_inp>RevDriver2_EndFix</user_inp></destination><expression><user_inp>[strEndFix]</user_inp></expression></formula><formula><destination><user_inp>RevDriver2_Agg</user_inp></destination><expression><user_inp>Agg("RevenueDriver2");</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="7" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Driver Flex3 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x17y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Driver Flex3</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-112" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevDriver3_Fix = Fix(@rela...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevDriver3_Fix</user_inp></destination><expression><user_inp>Fix(@relative("RevenueDriver3",0))</user_inp></expression></formula><formula><destination><user_inp>RevDriver3_EndFix</user_inp></destination><expression><user_inp>[strEndFix]</user_inp></expression></formula><formula><destination><user_inp>RevDriver3_Agg</user_inp></destination><expression><user_inp>Agg("RevenueDriver3");</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement seq="8" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">Rev Driver Flex4 eq Is Not...</property><property name="display_width">3</property><property name="Tile_Key">x20y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>Rev Driver Flex4</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-114" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">RevDriver4_Fix = Fix(@rela...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>RevDriver4_Fix</user_inp></destination><expression><user_inp>Fix(@relative("RevenueDriver4",0))</user_inp></expression></formula><formula><destination><user_inp>RevDriver4_EndFix</user_inp></destination><expression><user_inp>[strEndFix]</user_inp></expression></formula><formula><destination><user_inp>RevDriver4_Agg</user_inp></destination><expression><user_inp>Agg("RevenueDriver4");</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement kind="script" name="" seq="9" type="component"><component id="-115" name="" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="caption">Set Fix and clear</property><property name="display_label">Set Fix and clear</property><script type="calcscript"><![CDATA[Fix(@relative({Entity},0) [strCurrencyFix])

Fix("OEP_Prior FCST",OEP_Forecast)								
      clearblock all;							
endfix
[RevSrc1_Fix]
[RevSrc2_Fix]
[RevDriver1_Fix]
[RevDriver2_Fix]
[RevDriver3_Fix]
[RevDriver4_Fix]

	
					
Fix(@remove(@relative("Account",0),@list(@relative("System Members",0),@relative("OFS_Cross Module Integration",0))))				
Fix(OEP_Forecast)
      Fix(@relative("OFS_Total Plan",0),{Years})								
              Fix(@remove(@relative("Period",0),@list(@relative("Financial Integration Mapping",0),"No Period")))							
                  DATACOPY "OEP_Working" TO "OEP_Prior FCST";						
              endfix						
      endfix							
endfix
										
	Fix(&OEP_CurYr,OEP_Working)								
		fix({ActualMonths})							
			Fix(@relative("OFS_Total Plan",0))
                    cleardata "OEP_Forecast";
            endfix
			DATACOPY "OEP_Actual"->"OFS_Load" TO "OEP_Forecast"->"OFS_Calculated";						
		endfix					
	endfix					
endfix	

    										
 /* this section is required to calculate the drivers and then the none driver related accounts*/   	
Fix(OEP_Forecast)
	 Fix(OEP_Working)									
		Fix ({Years},@remove(@relative("Period",0),@list(@relative("Financial Integration Mapping",0),"No Period"))) 
        								
			Fix(@remove(@relative("Account",0),@list(@relative("System Members",0),@relative("OFS_Cross Module Integration",0))))		
				OFS_Calculated(
					@calcmode(block);	
                    @calcmode(bottomup);
							
                    if((@ismbr(&OEP_FCSTStartYr) and @ismbr(&OEP_FcstMnth:&OEP_EndMnth)) or (@ismbr(@RSIBLINGS (&OEP_CurYr)) and @ismbr(@relative("YearTotal",0))))				
	 					if(Not(@ismbr("No Year")))
	 					if("OFS_Trend"->"BegBalance" <>#Missing)			 								
	        						%Script(name:="Monthly_Trends")             			
	        						%Script(name:="Forecast_Only_Trends")			   									
	    				endif	
						endif
					endif					]]></script></component></statement><statement seq="10" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_width">3</property><property name="Tile_Key">x21y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>@DIMMEMBER(Period, OEP_W53)</user_inp></expression><expression seq="2"><user_inp>Is Not Empty</user_inp></expression></biop></expression></test><then><statement kind="formula" name="" seq="1" type="component"><component id="-117" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>WKScript</user_inp></destination><expression><user_inp>(@ismbr(@remove(@relative("OEP_Weekly Plan", 0),"OEP_W53"))) or ("TP-Weeks" == 53 and @ismbr(@relative("OEP_Weekly Plan", 0)))</user_inp></expression></formula></conditionblock></formulae></component></statement></then></if></statement><statement kind="formula" name="" seq="11" type="component"><component id="-118" name="" product="Planning" type="formula"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_label">Weekly = @DIMMEMBER("Perio...</property><property name="dtp_assignment">true</property><formulae><conditionblock><formula><destination><user_inp>Weekly</user_inp></destination><expression><user_inp>@DIMMEMBER("Period", "OEP_Weekly Plan")</user_inp></expression></formula><formula><destination><user_inp>IsWeeklyEnabled</user_inp></destination><expression><user_inp>@COMPARE([Weekly], "OEP_Weekly Plan", "true")</user_inp></expression></formula></conditionblock></formulae></component></statement><statement seq="12" type="if"><if product="Planning"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="display_height">2</property><property name="display_label">IF</property><property name="display_width">3</property><property name="Tile_Key">x25y0</property><property name="use_dtp">true</property><test><expression><biop type="eq"><expression seq="1"><user_inp>IsWeeklyEnabled</user_inp></expression><expression seq="2"><user_inp>True</user_inp></expression></biop></expression></test><then><statement kind="script" name="" seq="1" type="component"><component id="-120" name="" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="caption">Weekly Trends</property><property name="display_label">Weekly Trends</property><script type="calcscript"><![CDATA[elseif(@ismbr(&OEP_WeeklyFCSTRange))	
	If(Not(@ismbr("No Year")))	
    	if([WKScript])
		if((Not(@ismbr(&OEP_CurYr) and @ismbr(OEP_W1:&OEP_CurWeek))))
			%Script(name:="Weekly_Trends")									
			%Script(name:="Weekly_ForecastOnly")											
			endif         
        endif    				
		endif					
elseif (@ismbr(&OEP_QrtlyFcstStart:&OEP_QrtlyFcstEnd))						
	if(Not(@ismbr("No Year")))					
		if (@ismbr(@relative("OEP_Qrtly Plan", 0)))				
		If (@ismbr(&OEP_CurYr) and @ismbr(@LSIBLINGS(&OEP_CurQtr))) 
                    "OFS_Calculated" = @member(@HspNthMbr(@name(@children("YearTotal")), @HspMbrIndex(@name(@children("OEP_Qrtly Plan")), @name(@currmbr(Period)))));                                	
		else
			%Script(name:="Qrtly_Trends")		
		endif					
		endif				
	endif					
elseif (@ismbr(&OEP_YrlyFcstStart:&OEP_YrlyFcstEnd)) 						
	if(Not(@ismbr("No Year")))					
		if (@ismbr("OEP_Yearly Plan"))				
		%Script(name:="Yearly_Trends")				
		endif				
	endif					
endif						

endif						
 )						
 ;						
						
endfix							
	Fix(OFS_Calculated)							
		calc dim("Account");						
	endfix							
endfix									
endfix										
endfix

[RevDriver4_EndFix]
[RevDriver3_EndFix]
[RevDriver2_EndFix]
[RevDriver1_EndFix]
[RevSrc2_EndFix]
[RevSrc1_EndFix]

Endfix 			]]></script></component></statement></then><else><statement kind="script" name="" seq="1" type="component"><component id="-121" name="" product="Planning" type="script"><property name="application">HP4</property><property name="plantype">OEP_FS</property><property name="caption">End of Calculation</property><property name="display_label">End of Calculation</property><script type="calcscript"><![CDATA[							elseif (@ismbr(&OEP_QrtlyFcstStart:&OEP_QrtlyFcstEnd)) 					
							if(Not(@ismbr("No Year")))
                            if (@ismbr(@relative("OEP_Qrtly Plan", 0))) 			
								If (@ismbr(&OEP_CurYr) and @ismbr(@LSIBLINGS(&OEP_CurQtr))) 
                    "OFS_Calculated" = @member(@HspNthMbr(@name(@children("YearTotal")), @HspMbrIndex(@name(@children("OEP_Qrtly Plan")), @name(@currmbr(Period)))));                                
            					
                            	else
								%Script(name:="Qrtly_Trends")		
								endif		
							endif			
						    endif			
					elseif (@ismbr(&OEP_YrlyFcstStart:&OEP_YrlyFcstEnd)) 					
							if(Not(@ismbr("No Year")))
                            if (@ismbr("OEP_Yearly Plan")) 			
							%Script(name:="Yearly_Trends")			
							endif			
							endif	

					endif					
					 )					
	 ;									
						
			endfix							
			Fix(OFS_Calculated)							
				calc dim("Account");						
			endfix							
	endfix									
endfix										
endfix

[RevDriver4_EndFix]
[RevDriver3_EndFix]
[RevDriver2_EndFix]
[RevDriver1_EndFix]
[RevSrc2_EndFix]
[RevSrc1_EndFix]

Endfix 			]]></script></component></statement></else></if></statement><template_wizard><wizard_step name="Inputs" seq="0"/></template_wizard><template_prompts><restricted_prompt isPrompt="no" name="Application Type" type="Application Type"><property name="is_system">true</property><restricted_prompt_item><property name="prompt">Is Generic</property><property name="value">GENERAL</property></restricted_prompt_item><restricted_prompt_item><property name="prompt">Is PFP</property><property name="value">PROJECT</property></restricted_prompt_item><restricted_prompt_item><property name="prompt">Is PSB</property><property name="value">PSB</property></restricted_prompt_item></restricted_prompt><restricted_prompt isPrompt="no" name="Application" type="Application"><property name="is_system">true</property><value>Is Single Currency</value><restricted_prompt_item><property name="prompt">Is Multi Currency</property><property name="value">multi</property></restricted_prompt_item><restricted_prompt_item><property name="prompt">Is Single Currency</property><property name="value">single</property></restricted_prompt_item><restricted_prompt_item><property name="prompt">Is Simple Currency</property><property name="value">simple</property></restricted_prompt_item></restricted_prompt><template_slice_prompt isPrompt="false" name="UpperPOV" type="Member Range"><property name="is_system">true</property></template_slice_prompt><restricted_prompt isPrompt="no" name="Essbase Mode" type="Essbase Mode"><property name="is_system">true</property><restricted_prompt_item><property name="prompt">Is Hybrid</property><property name="value">Hybrid</property></restricted_prompt_item><restricted_prompt_item><property name="prompt">Is NonHybrid</property><property name="value">NonHybrid</property></restricted_prompt_item></restricted_prompt><template_prompt isPrompt="false" name="Rev Source Flex1" type="String"/><template_prompt isPrompt="false" name="Rev Source Flex2" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="Rev Driver Flex1" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="Rev Driver Flex2" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="Rev Driver Flex3" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="Rev Driver Flex4" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="RevSrc1_Fix" type="String"/><template_prompt isPrompt="false" name="RevSrc1_EndFix" type="String"/><template_prompt isPrompt="false" name="RevSrc1_Agg" type="String"/><template_prompt isPrompt="false" name="RevSrc2_Fix" type="String"/><template_prompt isPrompt="false" name="RevSrc2_EndFix" type="String"/><template_prompt isPrompt="false" name="RevSrc2_Agg" type="String"/><template_prompt isPrompt="false" name="RevDriver1_Fix" type="String"/><template_prompt isPrompt="false" name="RevDriver1_EndFix" type="String"/><template_prompt isPrompt="false" name="RevDriver1_Agg" type="String"/><template_prompt isPrompt="false" name="RevDriver2_Fix" type="String"/><template_prompt isPrompt="false" name="RevDriver2_EndFix" type="String"/><template_prompt isPrompt="false" name="RevDriver2_Agg" type="String"/><template_prompt isPrompt="false" name="RevDriver3_Fix" type="String"/><template_prompt isPrompt="false" name="RevDriver3_EndFix" type="String"/><template_prompt isPrompt="false" name="RevDriver3_Agg" type="String"/><template_prompt isPrompt="false" name="RevDriver4_Fix" type="String"/><template_prompt isPrompt="false" name="RevDriver4_EndFix" type="String"/><template_prompt isPrompt="false" name="RevDriver4_Agg" type="String"/><template_prompt isPrompt="true" name="mPeriod" type="Members"><property name="dim_type_limit">Period</property><property name="dimension_limit">both</property><property name="prompt_text">Enter Period</property></template_prompt><template_prompt isPrompt="true" name="mYear" type="Members"><property name="dim_type_limit">Year</property><property name="dimension_limit">both</property><property name="prompt_text">Enter Years</property></template_prompt><template_prompt isPrompt="true" name="mVersion" type="Member"><property name="dim_type_limit">Version</property><property name="dimension_limit">both</property><property name="prompt_text">Enter Version</property></template_prompt><template_prompt isPrompt="false" name="strEndFix" type="String"><value>EndFix</value></template_prompt><template_prompt isPrompt="false" name="dCurrency" type="Dimension"><property name="isMandatory">false</property><property name="isreadOnly">false</property><value>Currency</value><dimension name="Currency"/></template_prompt><template_prompt isPrompt="false" name="strCurrencyFix" type="String"><property name="isMandatory">false</property><property name="isreadOnly">false</property></template_prompt><template_prompt isPrompt="false" name="Weekly" type="String"/><template_prompt isPrompt="false" name="IsWeeklyEnabled" type="Boolean"/><template_prompt isPrompt="false" name="WKScript" type="String"><value>@ismbr(@relative("OEP_Weekly Plan", 0))</value></template_prompt></template_prompts></template></templates></HBRRepo>